package com.cloud.api.domain.alarm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cloud.mybatis.domain.PageModelNew;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@Accessors
@Schema(name = "QueryAlarm")
public class QueryAlarm extends PageModelNew {

    @Schema(description = "vin")
    private String vin;

    @Schema(description = "车牌号")
    private String licenseNumber;

    @Schema(description = "报警级别")
    private String alarmLevel;

    @Schema(description = "报警类型")
    private String alarmType;

    @Schema(description = "1:报警已处理 0未处理")
    @TableField("status")
    @NotNull(message = "{validation.alarm.status}")
    private Integer status;

    @Schema(description = "开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;
}
